package com.thkj.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.thkj.service.StatisticalService;

import dp.dao.PagingList;
import com.thkj.framework.base.BaseService;

@Service
public class StatisticalServiceImpl extends BaseService implements StatisticalService {

	@Override
	public Map getStatistical() {
		return dao.queryForObject("com.thkj.mapper.Statistical.getStatistical", null, Map.class);
	}

	@Override
	public PagingList<Map> loadDispatchData(Map<String, Object> param,int page, int size) {
		return dao.queryForPagingList("com.thkj.mapper.Statistical.loadDispatchData", param,page, size,  Map.class);
	}

	@Override
	public PagingList<Map> querySalesReport(Map<String, Object> param, int page, int size) {
		return dao.queryForPagingList("com.thkj.mapper.Statistical.querySalesReport", param,page, size,  Map.class);
	}

	@Override
	public PagingList<Map> queryPurchaseReport(Map<String, Object> param, int page, int size) {
		return dao.queryForPagingList("com.thkj.mapper.Statistical.queryPurchaseReport", param,page, size,  Map.class);
	}

	@Override
	public List<Map> loadEchartsDataForMoney() {
		return dao.queryForList("com.thkj.mapper.Statistical.loadEchartsDataForMoney", null, Map.class);
	}

	@Override
	public List<Map> queryProductTop() {
		return dao.queryForList("com.thkj.mapper.Statistical.queryProductTop", null, Map.class);
	}

	@Override
	public List<Map> loadDispatchData(Map<String, Object> param) {
		return dao.queryForList("com.thkj.mapper.Statistical.loadDispatchData", param, Map.class);
	}

	@Override
	public List<Map> querySummaryReceivable(Map<String, Object> param) {
		return dao.queryForList("com.thkj.mapper.Statistical.querySummaryReceivable", param, Map.class);
	}

	@Override
	public List<Map> querySummaryPayable(Map<String, Object> param) {
		return dao.queryForList("com.thkj.mapper.Statistical.querySummaryPayable", param, Map.class);
	}
	
	@Override
	public List<Map> loadEchartsDataForMoneyByMonth() {
		return dao.queryForList("com.thkj.mapper.Statistical.loadEchartsDataForMoneyByMonth", null, Map.class);
	}
}
